fix: enable --ensure-no-loss false flag to disable functionality #187
+24
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR completes the fix for the
--ensure-no-lossflag, allowing users to properly disable the functionality by passing--ensure-no-loss false.Changes
Updated option definition in both
tools/kysor/src/commands/start.tsandcommon/protocol/src/index.ts:--ensure-no-loss(boolean flag) to--ensure-no-loss [value](option that accepts a value)trueto string"true"for proper parsingfalseto disableFixed kysor.ts logic (
tools/kysor/src/kysor.ts):--ensure-no-loss falseUpdated version numbers in package.json files
Expected Behavior
--ensure-no-lossor no flag → defaults totrue(enabled) ✅--ensure-no-loss false→ disables the functionality ✅--ensure-no-loss true→ explicitly enables (same as default) ✅Testing
After applying these changes, verify:
./kysor start --valaccount <name> --ensure-no-loss falseshould disable ensureNoLoss./kysor start --valaccount <name> --ensure-no-lossshould enable ensureNoLoss (default)./kysor start --valaccount <name>(without flag) should enable ensureNoLoss (default)Related
This completes the fix that was partially addressed in PR #185, which fixed parsing but didn't allow users to pass
--ensure-no-loss falseto disable the functionality.